import request from '@/utils/request'

// 查询流程定义明细列表
export function listBpmnInfo(query) {
  return request({
    url: '/audit/bpmnInfo/list',
    method: 'get',
    params: query
  })
}

// 查询流程定义明细详细
export function getBpmnInfo(id) {
  return request({
    url: '/audit/bpmnInfo/' + id,
    method: 'get'
  })
}

// 新增流程定义明细
export function addBpmnInfo(data) {
  return request({
    url: '/audit/bpmnInfo',
    method: 'post',
    data: data
  })
}

// 修改流程定义明细
export function updateBpmnInfo(data) {
  return request({
    url: '/audit/bpmnInfo',
    method: 'put',
    data: data
  })
}

// 删除流程定义明细
export function delBpmnInfo(id) {
  return request({
    url: '/audit/bpmnInfo/' + id,
    method: 'delete'
  })
}
// 审批流程文件提交
export function deployBpmnInfo(data){
  return request(
    {
      url:"/audit/bpmnInfo/flow",
      method: 'post',
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      data:data
    }
  )
}
// 查看文件按钮
export function queryProcess(id,type) {
  return request({
    url: `/audit/bpmnInfo/queryProcess/${id}/${type}`,
    method: 'get',
  })
}